/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package ejb.laboratory;

import java.io.Serializable;
import javax.persistence.*;
import javax.xml.bind.annotation.XmlRootElement;

/**
 *
 * @author ciummo
 */
@Entity
@Table(name = "Controllo")
@XmlRootElement
@NamedQueries({
    @NamedQuery(name = "Controllo.findAll", query = "SELECT c FROM Controllo c"),
    @NamedQuery(name = "Controllo.findByIdControllo", query = "SELECT c FROM Controllo c WHERE c.idControllo = :idControllo"),
    @NamedQuery(name = "Controllo.findByCodArticolo", query = "SELECT c FROM Controllo c WHERE c.codArticolo = :codArticolo"),
    @NamedQuery(name = "Controllo.findByTesto", query = "SELECT c FROM Controllo c WHERE c.testo = :testo")})
public class Controllo implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Basic(optional = false)
    @Column(name = "idControllo")
    private Integer idControllo;
    @Column(name = "codArticolo")
    private String codArticolo;
    @Column(name = "testo")
    private String testo;

    public Controllo() {
    }

    public Controllo(Integer idControllo) {
        this.idControllo = idControllo;
    }

    public Integer getIdControllo() {
        return idControllo;
    }

    public void setIdControllo(Integer idControllo) {
        this.idControllo = idControllo;
    }

    public String getCodArticolo() {
        return codArticolo;
    }

    public void setCodArticolo(String codArticolo) {
        this.codArticolo = codArticolo;
    }

    public String getTesto() {
        return testo;
    }

    public void setTesto(String testo) {
        this.testo = testo;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (idControllo != null ? idControllo.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof Controllo)) {
            return false;
        }
        Controllo other = (Controllo) object;
        if ((this.idControllo == null && other.idControllo != null) || (this.idControllo != null && !this.idControllo.equals(other.idControllo))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "ejb.laboratory.Controllo[ idControllo=" + idControllo + " ]";
    }
    
}
